import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        redirect: "/work1"
    },
    {
        path: '/work1',
        name: "Work1",
        component: () => import('@/views/work1.vue'),
        // meta: { title: "作业1：倒三角" }
    },
    {
        path: '/work2',
        name: "Work2",
        component: () => import('@/views/work2.vue'),
        // meta: { title: "作业2：购物车" }
    },

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
  })

export default router